package com.github.lee.unsplash.model.repository

import androidx.annotation.IntRange
import com.github.lee.unsplash.model.api.TopicApi
import com.github.unsplash.repository.repository.ParamTopicOrderBy
import java.util.*
import javax.inject.Inject

class TopicRepository @Inject constructor(private val api: TopicApi) {

    suspend fun topics(
        page: Int = 1,
        @IntRange(from = 10) size: Int = 10,
        orderBy: ParamTopicOrderBy? = null,
        ids: String? = null
    ) = api.topics(page, size, orderBy?.toString()?.toLowerCase(Locale.ROOT), ids)

}